Skip to content

build: automate release packaging and version bumps with changesets#592

Merged
zimeg merged 4 commits intomainfrom
zimeg-build-changesets
Apr 23, 2026
Merged

build: automate release packaging and version bumps with changesets#592
zimeg merged 4 commits intomainfrom
zimeg-build-changesets

Conversation

@zimeg
Copy link
Copy Markdown
Member

@zimeg zimeg commented Apr 23, 2026

Summary

This PR automates release packaging and version bump with changesets to bring immutable releases to this project. Closes #521 🔏

Requirements

@zimeg zimeg added this to the 3.1 milestone Apr 23, 2026
@zimeg zimeg self-assigned this Apr 23, 2026
@zimeg zimeg added security semver:patch github_actions Pull requests that update GitHub Actions code release Tags for an updated version labels Apr 23, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.86%. Comparing base (dd817b0) to head (a102620).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #592   +/-   ##
=======================================
  Coverage   99.86%   99.86%           
=======================================
  Files           7        7           
  Lines         718      718           
=======================================
  Hits          717      717           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…g notes

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg marked this pull request as ready for review April 23, 2026 05:58
@zimeg zimeg requested a review from a team as a code owner April 23, 2026 05:58
Copy link
Copy Markdown
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢 Wanting to share now a previewed artifacts of investigation with some logs and comments following:

🔗 https://github.com/zimeg/slack-github-action/releases/tag/v3.0.7

🔥 Changelog
🪵 Publish

📸 Preview

Image

A few secrets will be added alongside these changes with follow up for release announcements to test the release process 👾 ✨

Comment on lines -126 to -158
## Docs

This repo contains two types of docs files:

- markdown files
- sidebar.json

The private repo containing the docs.slack.dev site pulls these in at build time.

Maintainers need to use the `run workflow` button associated with the `deploy` workflow in that private repo to update the docs with changes from here.

### Markdown Files

The markdown files here are secretly mdx files in disguise.

If you'd like to add images to pages, add the image files to the same folder the md file is in.

We appreciate markdown edits from anyone!!!

### Sidebar

`_sidebar.json` sets the slack github action docs sidebar

sidebar values take the form of "slack-github-action/path-within-docs/"

or, in other words - full path but remove "docs":
path: slack-github-action/docs/sending-variables.md
value: slack-github-action/sending-variables

for info on syntax see https://docusaurus.io/docs/sidebar

this file is copied into slackapi.github.io/slack-github-action/sidebar.js it is then called in slackapi.github.io/sidebars.js

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 note: This section is moved before releases to match adjacent guides!

Comment thread package.json
{
"name": "slack-github-action",
"version": "3.0.1",
"private": true,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 note: This project isn't published to npm so we mark it as private.

Comment thread package.json
Comment on lines +7 to +11
"files": [
"action.yml",
"cli/",
"dist/"
],
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📫 note: This isn't required but hopes to signal separate production files from development. We considered using it to package the release but found that made the workflow more complex.

Comment thread package.json
"lint:fix": "biome check --write",
"test": "node --test --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=test/coverage.txt test/*.spec.js",
"postversion": "TAG=\"v$(npm pkg get version | jq -r)\" && grep -rl 'slackapi/slack-github-action@v' ./docs ./example-workflows | xargs sed -i \"s|slackapi/slack-github-action@v.*|slackapi/slack-github-action@${TAG}|g\" && grep -rl 'slackapi/slack-github-action/cli@v' ./docs ./example-workflows | xargs sed -i \"s|slackapi/slack-github-action/cli@v.*|slackapi/slack-github-action/cli@${TAG}|g\""
"version": "npm run changeset version && npm install && npm run docs"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🪬 note: This script is mentioned as version with particular care made to callsites that use:

$ npm run version

Which is this command and different from the included version script but this remains most clear here and adjacent callsite I think.


- name: Distribute the latest tagged release
id: tag
uses: teunmooij/github-versioned-release@3edf649c6e5e5e976d43f2584b15bdc8b4c8f0df # v1.2.1
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌟 praise: Thank you for sharing this elegant approach to packaging @teunmooij!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📣 note: This arrived in #588 that we can include in the next release!

Comment on lines +36 to +44
- name: Update release PR
id: changesets
uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0
with:
commit: "chore: release"
title: "chore: release"
version: npm run version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️‍🗨️ note: Here's an example preview! zimeg#11

Comment on lines +84 to +91
- name: Gather version
id: version
run: |
VERSION="v$(node -p 'require("./package.json").version')"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "major=$(echo "$VERSION" | cut -d. -f1)" >> "$GITHUB_OUTPUT"
echo "minor=$(echo "$VERSION" | cut -d. -f1-2)" >> "$GITHUB_OUTPUT"
echo "$VERSION"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐢 note: The major and minor versions are both used as floating tags and aren't considered immutable. That's just for tags that have a proper release:

If you want to be able to update the Git tag of a release later, do not create a release on GitHub. Instead, create a tag as follows...

🔗 https://docs.github.com/en/actions/how-tos/create-and-publish-actions/using-immutable-releases-and-tags-to-manage-your-actions-releases

@zimeg zimeg merged commit 0b9c067 into main Apr 23, 2026
13 checks passed
@zimeg zimeg deleted the zimeg-build-changesets branch April 23, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code release Tags for an updated version security semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Immutable Releases

1 participant